<template>
  <el-dialog
    append-to-body
    :title="info"
    :visible.sync="dialogVisible"
    :close-on-click-modal="false"
    align="left"
    element-loading-text="拼命加载中"
    element-loading-spinner="el-icon-loading"
    element-loading-background="rgba(0, 0, 0, 0.8)"
    width="1200px">
    <div style="min-height: 300px; max-height: 500px; overflow-y: auto">
      <product-item :curr-product="{
              id:product.productId,
              price:product.productPrice,
              model:product.productModel,
              nums:product.productNums,
              name:product.productName,
              image:product.productImage,
              score:product.score,
            }" v-for="(product,index) in productList" :key="index"/>
      <div class="c"></div>
    </div>
  </el-dialog>
</template>

<script>
import ProductItem from '../Common/ProductItem'
export default {
  name: 'OrderReplyProductDialog',
  components: {ProductItem},
  props:{
    successFunction:Function
  },
  data: function () {
    return {
      info:'订单商品',
      dialogVisible: false,
      productList:[]
    }
  },
  watch:{
    dialogVisible:function () {
      if (!this.dialogVisible){
        this.productList=[]
      }
    }
  },
  mounted () {
  },
  methods: {
    open: function (productList) {
      this.productList=productList
      this.dialogVisible = true
      this.$forceUpdate()
    }
  }
}
</script>

<style scoped>

</style>
